package main

import (
	"context"
	"fmt"
	"gitee.com/jinmingzhi/eth-learn/pkg/ethtool"
)

const url = "http://localhost:8545"

func main() {
	ctx := context.Background()
	client, _ := ethtool.Dial(url)
	acounts, _ := client.EthAccounts(ctx)
	for i, v := range acounts {
		fmt.Println(fmt.Sprintf("acounts[%d]:", i), v)
	}
	balance, _ := client.EthGetBalance(ctx, acounts[1], "latest")
	fmt.Println("balace[2]:", balance)
}
